Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create: allow specifying author and difficulty #864

Merged
merged 6 commits into from
May 1, 2024

Conversation

ErikSchierboom
Copy link
Member

@ErikSchierboom ErikSchierboom commented Apr 22, 2024

Support specifying the author and/or difficulty when creating exercises.

CC @glennj

@ErikSchierboom ErikSchierboom changed the title authors contributors create: allow specifying author and difficulty Apr 22, 2024
@@ -75,6 +75,8 @@ Options for create:
--concept-exercise <slug> The slug of the concept exercise
-e, --exercise <slug> Only operate on this exercise
-o, --offline Do not update the cached 'problem-specifications' data
-a, --author The author of the exercise, approach or article
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is deliberately singular, as 99.99% of the time there is only one author.

@ErikSchierboom ErikSchierboom requested a review from ee7 April 22, 2024 07:05
if conf.action.difficulty.isSome:
let msg = "The difficulty argument is not supported for approaches"
stderr.writeLine msg
quit QuitFailure
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be a failure, or is a warning sufficient?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We tend to error for arguments that are not supported.

@ErikSchierboom ErikSchierboom merged commit 68b92e8 into main May 1, 2024
12 checks passed
@ErikSchierboom ErikSchierboom deleted the authors-contributors branch May 1, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants